home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / SCREEN.SWG / 0001_CLRSCR1.PAS.pas next >
Pascal/Delphi Source File  |  1993-05-28  |  746b  |  32 lines

  1. Procedure fillWord(Var dest; count, data: Word);
  2. begin
  3.   Inline(
  4.     $C4/$BE/dest/          { les di, dest[bp] }
  5.     $8B/$8E/count/         { mov cx, count[bp] }
  6.     $8B/$86/data/          { mov ax,data[bp] }
  7.     $FC/                   { cld }
  8.     $F3/$AB                { rep stosw }
  9.   )
  10. end;
  11.  
  12. Procedure ClrScr;
  13. Var
  14.   screen: Array[1..25, 1..80, 1..2] of Char Absolute $b800:$0000;
  15. begin
  16.   fillWord(screen, sizeof(screen) div 2, $0720)
  17. end;
  18.  
  19. { or }
  20.  
  21. Procedure ClrScr;
  22. Type
  23.   TScreen: Array[1..25, 1..80, 1..2] of Char;
  24. Var
  25.   VideoSegment: Word;
  26. begin
  27.   if (MemW[$40:$10] and $30)=$30 then
  28.     VideoSegment:=$B000
  29.   else
  30.     VideoSegment:=$B800;
  31.   fillWord(ptr(VideoSegment, 0)^, sizeof(TScreen) div 2, $0720)
  32. end;